home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / Includes_and_Autodocs_3.5 / include / clib / iffparse_protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-28  |  3.6 KB  |  103 lines

  1. #ifndef  CLIB_IFFPARSE_PROTOS_H
  2. #define  CLIB_IFFPARSE_PROTOS_H
  3.  
  4. /*
  5. **    $VER: iffparse_protos.h 40.2 (6.6.1998)
  6. **
  7. **    C prototypes. For use with 32 bit integers only.
  8. **
  9. **    Copyright © 1999 Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif /* __cplusplus */
  16.  
  17. #ifndef  EXEC_TYPES_H
  18. #include <exec/types.h>
  19. #endif
  20. #ifndef  LIBRARIES_IFFPARSE_H
  21. #include <libraries/iffparse.h>
  22. #endif
  23. #ifndef  UTILITY_HOOKS_H
  24. #include <utility/hooks.h>
  25. #endif
  26. /*--- functions in V36 or higher (Release 2.0) ---*/
  27.  
  28. /* Basic functions */
  29.  
  30. struct IFFHandle *AllocIFF( VOID );
  31. LONG OpenIFF( struct IFFHandle *iff, LONG rwMode );
  32. LONG ParseIFF( struct IFFHandle *iff, LONG control );
  33. VOID CloseIFF( struct IFFHandle *iff );
  34. VOID FreeIFF( struct IFFHandle *iff );
  35.  
  36. /* Read/Write functions */
  37.  
  38. LONG ReadChunkBytes( struct IFFHandle *iff, APTR buf, LONG numBytes );
  39. LONG WriteChunkBytes( struct IFFHandle *iff, CONST APTR buf, LONG numBytes );
  40. LONG ReadChunkRecords( struct IFFHandle *iff, APTR buf, LONG bytesPerRecord, LONG numRecords );
  41. LONG WriteChunkRecords( struct IFFHandle *iff, CONST APTR buf, LONG bytesPerRecord, LONG numRecords );
  42.  
  43. /* Context entry/exit */
  44.  
  45. LONG PushChunk( struct IFFHandle *iff, LONG type, LONG id, LONG size );
  46. LONG PopChunk( struct IFFHandle *iff );
  47.  
  48. /* Low-level handler installation */
  49.  
  50. LONG EntryHandler( struct IFFHandle *iff, LONG type, LONG id, LONG position, struct Hook *handler, APTR object );
  51. LONG ExitHandler( struct IFFHandle *iff, LONG type, LONG id, LONG position, struct Hook *handler, APTR object );
  52.  
  53. /* Built-in chunk/property handlers */
  54.  
  55. LONG PropChunk( struct IFFHandle *iff, LONG type, LONG id );
  56. LONG PropChunks( struct IFFHandle *iff, CONST LONG *propArray, LONG numPairs );
  57. LONG StopChunk( struct IFFHandle *iff, LONG type, LONG id );
  58. LONG StopChunks( struct IFFHandle *iff, CONST LONG *propArray, LONG numPairs );
  59. LONG CollectionChunk( struct IFFHandle *iff, LONG type, LONG id );
  60. LONG CollectionChunks( struct IFFHandle *iff, CONST LONG *propArray, LONG numPairs );
  61. LONG StopOnExit( struct IFFHandle *iff, LONG type, LONG id );
  62.  
  63. /* Context utilities */
  64.  
  65. struct StoredProperty *FindProp( CONST struct IFFHandle *iff, LONG type, LONG id );
  66. struct CollectionItem *FindCollection( CONST struct IFFHandle *iff, LONG type, LONG id );
  67. struct ContextNode *FindPropContext( CONST struct IFFHandle *iff );
  68. struct ContextNode *CurrentChunk( CONST struct IFFHandle *iff );
  69. struct ContextNode *ParentChunk( CONST struct ContextNode *contextNode );
  70.  
  71. /* LocalContextItem support functions */
  72.  
  73. struct LocalContextItem *AllocLocalItem( LONG type, LONG id, LONG ident, LONG dataSize );
  74. APTR LocalItemData( CONST struct LocalContextItem *localItem );
  75. VOID SetLocalItemPurge( struct LocalContextItem *localItem, CONST struct Hook *purgeHook );
  76. VOID FreeLocalItem( struct LocalContextItem *localItem );
  77. struct LocalContextItem *FindLocalItem( CONST struct IFFHandle *iff, LONG type, LONG id, LONG ident );
  78. LONG StoreLocalItem( struct IFFHandle *iff, struct LocalContextItem *localItem, LONG position );
  79. VOID StoreItemInContext( struct IFFHandle *iff, struct LocalContextItem *localItem, struct ContextNode *contextNode );
  80.  
  81. /* IFFHandle initialization */
  82.  
  83. VOID InitIFF( struct IFFHandle *iff, LONG flags, CONST struct Hook *streamHook );
  84. VOID InitIFFasDOS( struct IFFHandle *iff );
  85. VOID InitIFFasClip( struct IFFHandle *iff );
  86.  
  87. /* Internal clipboard support */
  88.  
  89. struct ClipboardHandle *OpenClipboard( LONG unitNumber );
  90. VOID CloseClipboard( struct ClipboardHandle *clipHandle );
  91.  
  92. /* Miscellaneous */
  93.  
  94. LONG GoodID( LONG id );
  95. LONG GoodType( LONG type );
  96. STRPTR IDtoStr( LONG id, STRPTR buf );
  97.  
  98. #ifdef __cplusplus
  99. }
  100. #endif /* __cplusplus */
  101.  
  102. #endif   /* CLIB_IFFPARSE_PROTOS_H */
  103.